import axios from "axios";

const request = axios.create({
  baseURL: "https://api.baidu.com", // 请求的后端接口地址
});

/**
 * 请求拦截器
 */
request.interceptors.request.use((config) => {
  console.log("request params: ", config);
  return config;
});

/**
 * 响应拦截
 */
request.interceptors.response.use((response) => {
  console.log("response params: ", response);
});

export default request;
